unit untListagemPadrao;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, Grids, DBGrids, StdCtrls, Buttons, ExtCtrls, Gauges;

type
  TfrmlistagemPadrao = class(TForm)
    Panel1: TPanel;
    Panel2: TPanel;
    btnIncluir: TSpeedButton;
    btnAlterar: TSpeedButton;
    btnExcluir: TSpeedButton;
    btnVoltar: TSpeedButton;
    edtPesquisar: TEdit;
    edtTotalRegistro: TEdit;
    Label2: TLabel;
    DBGrid1: TDBGrid;
    btnselecionar: TSpeedButton;
    Label1: TLabel;
    radioNome: TRadioButton;
    radioCodigo: TRadioButton;
    procedure btnVoltarClick(Sender: TObject);
    procedure FormKeyPress(Sender: TObject; var Key: Char);
    procedure radioNomeClick(Sender: TObject);
    procedure radioCodigoClick(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  frmlistagemPadrao: TfrmlistagemPadrao;

implementation

uses untCadastroCidade, untDM;

{$R *.dfm}

procedure TfrmlistagemPadrao.btnVoltarClick(Sender: TObject);
begin
close;
end;


procedure TfrmlistagemPadrao.FormKeyPress(Sender: TObject; var Key: Char);
begin
if (Key = #13) then
    begin
      Key := #0;
      Perform(WM_NEXTDLGCTL,0,0);
    end;

if (Key = #27) then
    begin
      Key := #0;
      Close;
    end;
end;

procedure TfrmlistagemPadrao.radioNomeClick(Sender: TObject);
begin
edtPesquisar.Clear;
end;

procedure TfrmlistagemPadrao.radioCodigoClick(Sender: TObject);
begin
 edtPesquisar.Clear;
end;

end.
